﻿@using System.Data
@model ZoomLa.SQLDAL.SQL.PageSetting
@{
    Model.url = "UserRecei";}
<div id="EGV" class="container">
    <ul id="addul" class="list-unstyled margin_t5">
        @foreach (DataRow dr in Model.dt.Rows)
        {
            <li class="col-lg-4 col-md-4 col-xs-6 col-sm-6" style="padding-left:0px;">
                <div class="panel panel-info  text-left">
                    <div class="panel-heading">
                        <i class="fa fa-user"></i> <strong>@dr["ReceivName"]</strong> <i class="fa fa-mobile-phone" style="font-size:16px;"></i> @dr["MobileNum"]
                        <i class='fa fa-check pull-right' title='默认'></i>
                    </div>
                    <div class="panel-body">
                        <div><div class="add_left">所在地区：</div><span>@dr["Provinces"]</span></div>
                        <div><div class="add_left">地址：</div>@dr["Street"]</div>
                        <div><div class="add_left">邮编：</div>@dr["ZipCode"]</div>
                    </div>
                    <div class="panel-footer">
                        <span><a href="AddUserAddress?id=@dr["id"]" title="修改"><i class="fa fa-pencil"></i>修改</a></span>
                        <a href="javascript:;" onclick="mvcpage.del({ id: '@dr["ID"]', url: 'Recei_Del', confirm: '你确定要删除吗?' });"><i class="fa fa-trash"></i>删除</a>
                        @if (dr["isDefault"].ToString() != "1")
                        {
                            <a href="javascript:;" class="pull-right" onclick="mvcpage.del({ id: '@dr["ID"]', url: 'Recei_SetDef'});">设为默认</a>
                        }
                    </div>
                </div>
            </li>
        }
    </ul>
    <script>
        $(function () {
            var addli = '<li class="col-lg-4 col-md-4 col-xs-6 col-sm-6" title="添加新地址" style="padding-left:0px;"><div class="panel panel-default text-center" style="height:180px;"><i class="fa fa-plus-square-o"  onclick="location.href=\'AddUserAddress\';" style="font-size:150px;line-height:190px;color:#e3e3e3;cursor:pointer;"></i></div><li>';
            $li = $("#addul li:last");
            if ($li.length > 0) { $li.after(addli); }
            else { $("#addul").append(addli); }
        })
    </script>
</div>